package com.bussiness.system.vo;


import com.bussiness.system.model.MyRoleEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zyj
 * @description
 * @date 2019/9/23 20:28
 **/
public class MyRoleVo {


    private String id;
    private String name;
    private String roleCode;
    private String description;
    private String roleStatus;

    public MyRoleVo(){}

    public MyRoleVo cover(MyRoleEntity myRoleEntitie){
            MyRoleVo myRoleVo = new MyRoleVo();
            myRoleVo.setId(String.valueOf(myRoleEntitie.getId()));
            myRoleVo.setName(myRoleEntitie.getName());
            myRoleVo.setDescription(myRoleEntitie.getDescription());
            myRoleVo.setRoleCode(myRoleEntitie.getRoleCode());
            myRoleVo.setRoleStatus(myRoleEntitie.getRoleStatus());
            return myRoleVo;
    }

    public List<MyRoleVo> coverList(List<MyRoleEntity> myRoleEntities){
        List<MyRoleVo> list = new ArrayList<>();
        for(MyRoleEntity myRoleEntitie: myRoleEntities){
            list.add(this.cover(myRoleEntitie));
        }

        return list;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public String getRoleStatus() {
        return roleStatus;
    }

    public void setRoleStatus(String roleStatus) {
        this.roleStatus = roleStatus;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }


}
